package com.xxxy.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xxxy.model.KnowledgePoint;
import com.xxxy.response.GradeAnalysisResponse;
import com.xxxy.response.KnowledgePointResponse;

import java.util.List;
import java.util.Map;

/**
 * @author sjh
 * @date 2022/2/17 14:50
 */
public interface KnowledgePointService extends IService<KnowledgePoint> {

    /**
     * 获取指定科目的知识点列表
     * @param courseId 课程id
     * @return
     */
    List<KnowledgePointResponse> ListTree(Integer courseId);

    /**
     * 一张试卷中知识点对应的题目
     * @param examId
     * @return
     */
    Map<String, String> questionsByKnowledgePoint(Integer examId);

    /**
     * 以map的形式返回单个学生的考试数据<知识点，[得分，总分]>
     * @param examId
     * @param studentAccount
     * @return
     */
    Map<String,Double[]> examAnalysis(Integer examId, String studentAccount);

    /**
     * 获取学生成绩分析
     * @param examId
     * @param studentAccount
     * @return
     */
    List<GradeAnalysisResponse> getStudentGradeAnalysis(Integer courseId, Integer examId, String studentAccount);

    /**
     * 获取班级成绩分析
     * @param courseId
     * @param examId
     * @param teachingClassId
     * @return
     */
    List<GradeAnalysisResponse> getClassOrCourseGradeAnalysis(Integer courseId, Integer examId, Integer teachingClassId);

}
